﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.SqlTypes;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Blog.Core.Domain.Model.User
{
    /// <summary>
    /// 权限表
    /// </summary>
    [Table("Permissions")]
    public class Permissions:Audit
    {
        /// <summary>
        /// 权限编号
        /// </summary>
        [Key]
        public int Id { get; set; }
        /// <summary>
        /// 权限父级编号
        /// </summary>
        [Required]
        [Display(Name = "权限父级编号")]
        public int Permissions_Pid { get; set; }
        /// <summary>
        /// 权限名称
        /// </summary>
        [Required]
        [Display(Name ="权限名称")]
        public string PermissionsName { get; set; }
        /// <summary>
        /// 权限描述
        /// </summary>
        [Required]
        [Display(Name = "权限描述")]
        public string? PermissionsDescription { get; set; }
        /// <summary>
        /// 排序
        /// </summary>
        [Display(Name = "排序")]
        public int? OrderSort { get; set; }
        /// <summary>
        /// Api接口
        /// </summary>
        [Display(Name = "Api接口")]
        public string? ApiId { get; set; }
        /// <summary>
        /// 路由接口
        /// </summary>
        [Display(Name = "路由接口")]
        public string? RouteId { get; set; }
        /// <summary>
        /// 菜单图标
        /// </summary>
        [Display(Name = "菜单图标")]
        public string? Icon { get; set; }
        /// <summary>
        /// 是否是按钮
        /// </summary>
        [Display(Name = "是否是按钮")]
        public bool? IsButton { get; set; } = false;
        /// <summary>
        /// 是否是隐藏菜单
        /// </summary>
        [Display(Name = "是否是隐藏菜单")]
        public bool? IsHide { get; set; } = false;
        /// <summary>
        /// 按钮事件
        /// </summary>
        [Display(Name = "按钮事件")]
        public string? Func { get; set; }
        /// <summary>
        /// 激活状态
        /// </summary>
        [Display(Name = "激活状态")]
        public bool Enabled { get; set; } = true;
    }
}
